<div class="virtual-list-footer"
  ref:node
  style="transform: translateY({$heightWithoutFooter}px);" >
  <svelte:component this={component} />
</div>
<style>
  .virtual-list-footer {
    position: absolute;
    top: 0;
    width: 100%;
  }
</style>
<script>
  import { virtualListStore } from './virtualListStore.js'
  import { mark, stop } from '../../_utils/marks.js'

  export default {
    oncreate () {
      requestAnimationFrame(() => {
        const node = this.refs.node
        if (!node) {
          return
        }

        mark('VirtualListFooter gBCR')
        const rect = node.getBoundingClientRect()
        stop('VirtualListFooter gBCR')
        this.store.setForRealm({ footerHeight: rect.height })
      })
    },
    store: () => virtualListStore
  }
</script>
